//
//  BYHotCommentCell.m
//  ZhiHuiLiJiang
//
//  Created by Work on 2018/11/21.
//  Copyright © 2018年 WisdomLijiang. All rights reserved.
//已废弃

#import "BYHotCommentCell.h"

@implementation BYHotCommentCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        [self addView];
    }
    return self;
}

-(void)addView{
    
    [self.contentView addSubview:self.heardView];
    [self.contentView addSubview:self.nameLabel];
    [self.contentView addSubview:self.timeLabel];
    [self.contentView addSubview:self.contentLabel];
    [self.heardView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.contentView.mas_top).offset(15);
        make.left.mas_equalTo(self.contentView.mas_left).offset(12);
        make.size.mas_equalTo(CGSizeMake(33, 33));
    }];
    
    [self.nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.heardView.mas_top);
        make.left.mas_equalTo(self.heardView.mas_right).offset(12);
        
    }];  [self.timeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.nameLabel.mas_bottom).offset(8);
        make.left.mas_equalTo(self.nameLabel);
        
    }];  [self.contentLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.timeLabel.mas_bottom).offset(8);
        make.left.mas_equalTo(self.nameLabel);
        make.right.mas_equalTo(self.contentView.mas_right).offset(-12);

    }];
    
}
-(UIImageView *)heardView{
    
    if (!_heardView) {
        _heardView  = [[UIImageView alloc]init];
        _heardView.layer.cornerRadius = 16;
        _heardView.layer.masksToBounds = YES;
    }
    return _heardView;
}
-(UILabel *)nameLabel{
    if (!_nameLabel) {
        _nameLabel  = [[UILabel alloc]init];
        _nameLabel.font = H15;
        _nameLabel.textColor = RGBA(40, 40, 40, 1);
        [_nameLabel sizeToFit];
    }
    return _nameLabel;
}
-(UILabel *)timeLabel{
    if (!_timeLabel) {
        _timeLabel  = [[UILabel alloc]init];
        _timeLabel.font = H12;
        _timeLabel.textColor = RGBA(152, 152, 152, 1);
        [_timeLabel sizeToFit];
    }
    return _timeLabel;
}
-(UILabel *)contentLabel{
    if (!_contentLabel) {
        _contentLabel  = [[UILabel alloc]init];
        _contentLabel.font = H16;
        _contentLabel.textColor = RGBA(40, 40, 40, 1);
        [_contentLabel sizeToFit];
    }
    return _contentLabel;
}
@end
